package minidb.parse.exps;
import java.util.*;

public class ViewList
{
	public List<String> viewList;
	
	public ViewList()
	{
		this.viewList=new ArrayList<String>();
	}
	
	public ViewList AddViewField(String f)
	{
		this.viewList.add(f);
		return this;
	}
	
	public List<String> GetViewList()
	{
		return this.viewList;
	}
	
	public String Print()
	{
		StringBuilder sb=new StringBuilder("");
		if(this.viewList.size()>0)
		{
			
			sb.append("(");
			for(int i=0;i<this.viewList.size();i++)
			{
				sb.append(this.viewList.get(i));
				if(i!=this.viewList.size()-1)
					sb.append(",");
			}
			sb.append(")");
		}
		return sb.toString();	
	}
}
